using NFreeMarker.Template;

namespace NFreeMarker.Ext.Beans
{
    /**
     * <p>A class that will wrap instances of {@link java.lang.Boolean} into a
     * {@link TemplateBooleanModel}.
     * @author Attila Szegedi
     * @version $Id: BooleanModel.java,v 1.8 2003/01/12 23:40:12 revusky Exp $
     */
    public class BooleanModel : BeanModel, ITemplateBooleanModel
    {
        private readonly bool _value;
        
        public BooleanModel(bool value, BeansWrapper wrapper)
            : base(value, wrapper)
        {
            _value = value;
        }

        public bool GetAsBoolean()
        {
            return _value;
        }
    }
}